import 'package:json_annotation/json_annotation.dart';
part 'wallet_list_model.g.dart';

@JsonSerializable()
class WalletListModel {
  @JsonKey(name: "list")
  List<WalletListItemModel>? list;

  WalletListModel({required this.list});

  factory WalletListModel.fromJson(Map<String, dynamic> json) =>
      _$WalletListModelFromJson(json);

  Map<String, dynamic> toJson() => _$WalletListModelToJson(this);
}

@JsonSerializable()
class WalletListItemModel {
  int id;
  String name;
  String public_key;
  int status;
  int import_type;

  WalletListItemModel(
      {required this.id,
      required this.status,
      required this.public_key,
      required this.import_type,
      required this.name});

  factory WalletListItemModel.fromJson(Map<String, dynamic> json) =>
      _$WalletListItemModelFromJson(json);

  Map<String, dynamic> toJson() => _$WalletListItemModelToJson(this);
}
